<template>
  <div class="wrapper">
    <div class="title">周末去哪儿</div>
    <ul class="list">
      <li class="item" v-for="item of list" :key="item.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" :alt="item.title">
        </div>
        <div class="item-content">
          <div class="item-title">{{item.title}}</div>
          <div class="item-desc">{{item.desc}}</div>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: 'HomeWeekend',
  props: {
    list: Array
  }
}
</script>
<style lang="stylus" scoped>
  @import "~styles/variables.styl"
  @import "~styles/mixins.styl"
  .wrapper
    margin-top: .2rem
  .title
    padding: .24rem 0 .26rem .2rem
    font-size: .32rem
    color: $darkTxtColor
    background-color: #f5f5f5;
  .list
    list-style: none
    margin: 0
    padding: 0
  .item
    overflow: hidden
    margin-bottom: .2rem
    .item-img-wrapper
      overflow: hidden
      height: 0;
      padding-bottom: 33.9%
    .item-img
      width: 100%
    .item-content
      padding: .14rem .2rem .2rem;
      min-width: 0
      overflow: hidden
      .item-title
        height: .44rem;
        color: #212121;
        font-size: .32rem;
        line-height: .44rem;
        width: 100%;
        ellipsis()
      .item-desc
        margin-top: .14rem
        line-height: 1.26
        color: $lightDarkTxtColor

</style>
